﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

/// <summary>
/// Summary description for Dish
/// </summary>
namespace Entities
{
    public class Dish
    {
        public Dish()
        {
        }
        private Int16 _id;
        private String _name;
        private String _description;
        public Boolean Approved;
        public List<Ingredient> Ingredients;

        public Int16 Id
        {
            get { return _id; }
            set { _id = value; }
        }
        public String Name
        {
            get { return _name; }
            set { _name = value; }
        }
        public String Description
        {
            get { return _description; }
            set { _description = value; }
        }
    }
    public class Ingredient
    {
        public Ingredient()
        { }
        private Int16 _id;
        private String _name;
        private String _description;
        private Int16 _parentId;

        public Int16 Id
        {
            get { return _id; }
            set { _id = value; }
        }
        public String Name
        {
            get { return _name; }
            set { _name = value; }
        }
        public String Description
        {
            get { return _description; }
            set { _description = value; }
        }
        public Int16 ParentId
        {
            get { return _parentId; }
            set { _parentId = value; }
        }
    }
    public class DishIngredient
    {
        public DishIngredient()
        { }
        public Int16 Id;
        public Int16 DishId;
        public Int16 IngredientId;
    }
    public class CagetoryDish
    {
        public CagetoryDish()
        { }
        public Int16 ScoreId;
        public Boolean Available;
        public Int16 CategoryId;
        public void SetScore(Int16 scoreId)
        {
            BLL.Command.SetScoreForCategoryDish(_id, ScoreId);
        }
        public Int16 Id
        {
            get { return _id; }
            set { _id = value; }
        }
        public Int16 DishId
        {
            get { return _dishid;}
            set { _dishid =value;}
        }
        public Double Price
        {
            get { return _price; }
            set { _price = value; }
        }
        public String Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private Int16 _id;
        private String _name;
        private double _price;
        private Int16 _dishid;
    }
}